package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.tb.tbexclusivegoods.TbExclusiveGoodsQuery;
import com.uzai.console.entity.TbExclusiveGoods;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TbExclusiveGoodsMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int insert(TbExclusiveGoods record);

    int insertSelective(TbExclusiveGoods record);

    TbExclusiveGoods selectById(@Param("id") Long id, @Param("merId") Long merId);

    TbExclusiveGoods selectByItemIdSuffix(@Param("itemIdSuffix") String itemIdSuffix, @Param("merId") Long merId);

    int updateByIdSelective(TbExclusiveGoods record);

    int updateById(TbExclusiveGoods record);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    List<TbExclusiveGoods> findByList(Page<TbExclusiveGoods> page, @Param("query") TbExclusiveGoodsQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    List<TbExclusiveGoods> findByList(@Param("query") TbExclusiveGoodsQuery query);


}